<?php
namespace Home\Controller;

use Think\Controller;

class CostController extends Controller
{

    public function Index()
    {
        
        $db = D("Info");
        $where = "type='invitejob'";
        $count = $db->where($where)->count();
        $pagecount = 1;
        $page = new \Think\Page($count , $pagecount);
        //$page->parameter = $row; //此处的row是数组，为了传递查询条件
//         $page->setConfig('header','共 %TOTAL_ROW% 条记录');
//         $page->setConfig('first','首页');
//         $page->setConfig('prev','上一页');
//         $page->setConfig('next','下一页');
//         $page->setConfig('last','尾页');
    //    $page->setConfig('theme','%FIRST% %UP_PAGE% %LINK_PAGE% %DOWN_PAGE% %END% 第 '.I('p',1).' 页/共 %TOTAL_PAGE% 页 ( '.$pagecount.' 条/页 共 %TOTAL_ROW% 条)');
        $show = $page->show();
        $list = $db->where($where)->order('id desc')->limit($page->firstRow.','.$page->listRows)->select();
        $this->assign('list',$list);
        $this->assign('page',$show);
        var_dump($show);exit();
        $this->display('index');
      
    }
  
}